Skip to content

Conversation

siverne
Copy link
Member

@siverne siverne commented Nov 24, 2026

Closes #112

What

  • ESLint and Prettier in backend/ with the same settings as the frontend (eslint.config.mjs, .prettierrc, .prettierignore), and the scripts lint, format and format:check, so npm run check runs them.
  • .gitattributes in backend/, so Prettier also passes on Windows (as in Prettier fails on Windows because of CRLF line endings #78).
  • TypeScript in the backend goes from 7 to ~6.0.2, the same as the frontend. typescript-eslint supports TypeScript up to 6.0, and TypeScript 7 no longer has the API it uses. The code type checks and the tests pass on 6 without changes.
  • The whole backend formatted with Prettier: two spaces instead of a mix of two and four.
  • App.test.tsx from test(frontend): load the lazy pages once before the route tests (#103) #104 formatted, since it made the frontend Prettier check fail.
  • README and docs/requirements.md updated.

ESLint found no errors in the backend.

How to review

Commit by commit. The commit style(backend): format with Prettier only changes formatting in 50 files and can be skipped.

How to test

  1. npm ci in backend/ (new dev dependencies).
  2. npm run check from the root: all 9 checks pass, and no step says «not set up».

For the rest of the group

This touches almost every file in backend/src. If you have a branch with backend changes, merge main into it after this is merged and run npm run format --prefix backend to avoid most conflicts.

AI

Claude found that typescript-eslint does not support TypeScript 7 and suggested the setup. I made the files and ran the commands myself.

@siverne siverne requested a review from a team as a code owner November 24, 2026 12:32
Copy link
Member

@oscarba oscarba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works :)

@oscarba oscarba merged commit 8e31e0c into main Nov 24, 2026
@oscarba oscarba deleted the 112-backend-eslint-prettier branch November 24, 2026 12:37
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESLint and Prettier in the backend
2 participants